home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
etc
/
rc2.z
/
rc2
Wrap
Text File
|
1992-04-03
|
1KB
|
82 lines
#! /bin/sh
#Tag 0x00000f00
#ident "$Revision: 1.12 $"
# "Run Commands" executed when the system is changing to init state 2,
# traditionally called "multi-user".
. /etc/TIMEZONE
# Pickup start-up packages for mounts, daemons, services, etc.
set `who -r`
if [ $9 = "S" ]
then
echo 'The system is coming up. Please wait.'
BOOT=yes
if [ -f /etc/rc.d/PRESERVE ] # historical segment for vi and ex
then
mv /etc/rc.d/PRESERVE /etc/init.d
ln /etc/init.d/PRESERVE /etc/rc2.d/S02PRESERVE
fi
elif [ $7 = "2" ]
then
echo 'Changing to state 2.'
if [ -d /etc/rc2.d ]
then
for f in /etc/rc2.d/K*
{
if [ -s ${f} ]
then
/bin/sh ${f} stop
fi
}
fi
fi
# handle local mounts specially, rather than as part of a generic rc2.d
# operation, so that if the some mounts fail, we can warn the user
if [ -f /etc/mountall ]
then
if /etc/mountall
then :
else
echo '\07Some filesystems failed to mount; may be unable to reach multiuser state'
sleep 5
fi
fi
if [ -d /etc/rc2.d ]
then
for f in /etc/rc2.d/S*
{
if [ -s ${f} ]
then
/bin/sh ${f} start
fi
}
fi
if [ "${BOOT}" = "yes" ]
then
stty sane tab3 2>/dev/null
fi
if [ "${BOOT}" = "yes" -a -d /etc/rc.d ]
then
for f in `ls /etc/rc.d`
{
if [ ! -s /etc/init.d/${f} ]
then
/bin/sh /etc/rc.d/${f}
fi
}
fi
if [ "${BOOT}" = "yes" -a $7 = "2" ]
then
echo 'The system is ready.'
elif [ $7 = "2" ]
then
echo 'Change to state 2 has been completed.'
fi